package com.java.basic;

class ClassE{
    static int count;
    //静态代码块
    static{
        count=10;
    }
    {//实例代码块(构建对象实例执行)
        count++;
    }
}
class ClassF{
    public static void show(){
        System.out.println("ClassF.show()");
    }
}
class SubClassF extends  ClassF{
    public static void show(){
        System.out.println("SubClassF.show()");
    }
}
public class StaticTest02 {
    public static void main(String[] args) {
       ClassE e1=new ClassE();
       e1.count++;
       ClassE e2=new ClassE();
       e2.count++;
       ClassE.count++;
       System.out.println(ClassE.count);//15

       ClassF classF=new SubClassF();
       classF.show(); //ClassF.show(); //静态方法不支持多态

    }
}
